home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / pascal / btr_oop.exe / TEST.PAS < prev   
Pascal/Delphi Source File  |  1991-05-27  |  2KB  |  96 lines

  1. Program test;
  2. {$D+,L+}
  3. Uses Globals,Btrv,Btrv_IO,CPU_OBJ,PEC_OBJ;
  4.  
  5. VAR
  6.   PCPU       : PtrCPU;
  7.   CPU        : TCPU;
  8.   PPiece     : PtrPiece;
  9.   Piece      : TPiece;
  10.   SomePosition : LongInt;
  11.  
  12. Procedure CreateCPURecord;
  13. Begin
  14.   With PCPU^.Fld do
  15.   begin
  16.     Name        := 'Miller, Steve';
  17.     Location    := 'X25';
  18.     Dept        := 52;
  19.     SysNum      := '12354';
  20.     AssetNum    := '897359';
  21.     SysMfg      := 'Datel';
  22.     SerNum      := '5432-234-234';
  23.     SysType     := '386';
  24.     SysSpeed    := '33mh';
  25.     BiosMfg     := 'Asian Rim';
  26.     BiosVer     := 'v.3.45';
  27.     RAMSize     := '4meg';
  28.     RamType     := 'Sims';
  29.     RamSpeed    := '22ns';
  30.     Status      := 'In house';
  31.     DatePur     := 0;
  32.     Invoice     := '9494949';
  33.     Vendor      := 'Joes Computer World';
  34.     Price       := 234;
  35.     Note1       := 'THis is the winder of our discontent';
  36.     Note2       := 'So it goes, so it goes';
  37.   end;
  38. end;
  39.  
  40. Procedure CreatePieceRecord;
  41. Begin
  42.   With PPiece^.Fld do
  43.   begin
  44.     Component   := 'Keyboard';
  45.     CompNum     := 'X25';
  46.     SerNum      := '123-123-432';
  47.     CompMfg     := 'Keytronic';
  48.     CompModel   := '120 Key';
  49.     CompType    := 'KeyBoard';
  50.     CompSize    := '120 key';
  51.     Status      := 'In House';
  52.     AssetNum    := '595959';
  53.     DatePur     := 0;
  54.     Vendor      := 'Datel Inc';
  55.     Invoice     := '483984';
  56.     Price       := 456.55;
  57.     SysNum      := '9878234';
  58.     Note1       := 'This is the Notes1 field';
  59.     Note2       := 'THis is the Notes2 field';
  60.   end;
  61. end;
  62.  
  63. Procedure ModifyCPURecord;
  64. Begin
  65.   With PCPU^.Fld do
  66.   begin
  67.     Name        := 'Miller, Steve';
  68.   end;
  69. end;
  70.  
  71. begin
  72.   New(PCpu,Init);
  73.   Status := PCpu^.OpenFile('D:\BT\CPU.DMF',0);
  74.  
  75.   Status := PCpu^.StepFirst;
  76.   Status := PCpu^.StepLast;
  77.   Status := PCpu^.StepFirst;
  78.   Status := PCpu^.StepNext;
  79.   Status := PCpu^.StepNext;
  80.   Status := PCpu^.StepPrevious;
  81.   Status := PCpu^.StepPrevious;
  82.   Status := PCpu^.GetFirst(0);
  83.   Status := PCpu^.GetPosition(SomePosition);
  84.   Status := PCpu^.GetNext;
  85.   Status := PCpu^.GetNext;
  86.   Status := PCpu^.GetNext;
  87.   Status := PCpu^.GetDirect(SomePosition,0);
  88.  
  89.   Status := PCpu^.GetGr(('C'),0);
  90.   Status := PCpu^.GetNext;
  91.   Status := PCpu^.GetNext;
  92.  
  93.   Status := PCpu^.CloseFile;
  94.  
  95.   PCpu^.Done;
  96. end.